package my.senix.sc.config;

import org.springframework.boot.autoconfigure.data.redis.JedisClientConfigurationBuilderCustomizer;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.jedis.JedisClientConfiguration;

import java.time.Duration;

/**
 * Created by lhs on 2018/11/8.
 */
@Configuration
public class RedisCustomizer  implements JedisClientConfigurationBuilderCustomizer {

    @Override
    public void customize(JedisClientConfiguration.JedisClientConfigurationBuilder clientConfigurationBuilder) {
        clientConfigurationBuilder.readTimeout(Duration.ofSeconds(5));
    }
}
